export default {
    getStorage(key) {
        if (key == 'token') {
            return sessionStorage.getItem(key)
        } else {
            return JSON.parse(sessionStorage.getItem(key))
        }
    },
    setStorage(key, value) {
        if (typeof value != 'string') {
            value = JSON.stringify(value)
        }
        sessionStorage.setItem(key, value)
    },
    removeStorage(key) {
        sessionStorage.removeItem(key)
    }
}